<template>
  <div class="detail">
    <h3>详情页</h3>
    <div>发布时间:{{detail.time | date}}</div>
    <div>发布时间:{{4 | fillzero}}</div>
  </div>
</template>

<script lang="ts">
import { Vue, Component } from "vue-property-decorator";
@Component({
  validate({params,query}){
    return typeof params.id === 'string'
  },
  // transition:'动画名'
  transition:'test',
  
  asyncData({query,params,app:{$axios}}){
    return $axios({
      url:`/api/goods/${query.collectionName}/${params.id}`
    }).then(
      (res:any)=>({detail:res.data.data})
    )
  },
  head(){
    return this.$seo(this.detail.title,this.detail.des,[{}])
  }
 
})
export default class GoodsDetail extends Vue {
   
}

</script>
<style scoped>
  /* .test-enter-active, .test-leave-active{
    transition:  .5s ease all;
  }
   .test-enter, .test-leave-active{
    margin-left: -1000px;
  } */
</style>


